Previous Book Contents Book Index Next

Inside Macintosh: 3D Graphics Programming With QuickDraw 3D /
Chapter 2 - 3D Viewer / 3D Viewer Reference
3D Viewer Routines / Getting Viewer Information


Q3ViewerGetState

You can use the Q3ViewerGetState function to get the current state of a viewer object.

unsigned long Q3ViewerGetState (TQ3ViewerObject theViewer);
theViewer
A viewer object.
DESCRIPTION
The Q3ViewerGetState function returns a long integer that encodes information about the current state of the viewer object specified by the theViewer parameter. Bits of the returned long integer are addressed using these constants, which define the viewer state flags:

enum {
   kQ3ViewerEmpty             = 0,
   kQ3ViewerHasModel          = 1
};
If Q3ViewerGetState returns the value kQ3ViewerEmpty, there is no image currently displayed by the specified viewer object. If Q3ViewerGetState returns the value kQ3ViewerHasModel, there is an image currently displayed by the specified viewer object. You can use this information to determine whether Edit menu commands such as Cut, Clear, and Copy should be enabled or disabled.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996